package com.taxi.util;

import java.util.Date;

/**
 * @Author Dell
 * @Date 2021/6/11 16:47
 */
public abstract class DateTimeHelper {

    public static int dateToInt(Date date) {
        return (int) (date.getTime() / 1000);
    }

    public static Date intToDate(int timestamp) {
        return new Date((long) timestamp * 1000);
    }

}
